// 列表头按钮配置

import url from "@/axios/url";
import {getDict} from "@/api/common";
const { mesUrl, adminUrl, wmsUrl } = url()
export const exportUrl = `${mesUrl}reportOperate/procedureTimeObtainExport`

// 搜索条件配置
export const searchConfig = {
  data() {
    const self = this;
    return {
      searchDialog: {
        inline: true,
        formDesc: {
          modelName: {
            type: "input",
            label: '车型',
          },
          vinCode: {
            type: "input",
            label: 'VIN编码',
          },
          uwbCode: {
            type: "input",
            label: 'UWB编码',
          },
          orderState: {
            type: "select",
            label: '状态',
            prop: {
              text: "description",
              value: "value"
            },
            // Promise 对象
            options: async (data) => {
              const list = await getDict("mes_pick_up_order_status")
              return list.data.result
            }
          },
          time1: {
            type: "daterange",
            label: "接车时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["receiveCarTimeMin", "receiveCarTimeMax"],
            },
          },
          time2: {
            type: "daterange",
            label: "离场时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["departureTimeMin", "departureTimeMax"],
            },
          },
          time3: {
            type: "daterange",
            label: "复检开始时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["recheckStartTimeMin", "recheckStartTimeMax"],
            },
          },
          time4: {
            type: "daterange",
            label: "复检结束时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["recheckEndTimeMin", "recheckEndTimeMax"],
            },
          },
          time5: {
            type: "daterange",
            label: "整备开始时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["preparationStartTimeMin", "preparationStartTimeMax"],
            },
          },
          time6: {
            type: "daterange",
            label: "整备结束时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["preparationEndTimeMin", "preparationEndTimeMax"],
            },
          },
          time7: {
            type: "daterange",
            label: "质检结束时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["qualityTestingTimeMin", "qualityTestingTimeMax"],
            },
          },
          time8: {
            type: "daterange",
            label: "报价全部确认时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["allConfirmTimeMin", "allConfirmTimeMax"],
            },
          },
          time9: {
            type: "daterange",
            label: "工单全部报工时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["allCompleteTimeMin", "allCompleteTimeMax"],
            },
          },
          time10: {
            type: "daterange",
            label: "质检开始时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["offStartTimeMin", "offStartTimeMax"],
            },
          },
          time11: {
            type: "daterange",
            label: "质检结束时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["offEndTimeMin", "offEndTimeMax"],
            },
          },
          time12: {
            type: "daterange",
            label: "展厅时间",
            attrs: {
              valueFormat: "yyyy-MM-dd",
              searchArrKey: ["exhibitionHallTimeMin", "exhibitionHallTimeMax"],
            },
          },
        },
      },
    };
  },
};

export const operateList = [
  {
    name: $i18n.t("common.export"),
    type: "primary",
    icon: "el-icon-download",
    handleName: "export", //点击时返回的标识
    url: exportUrl,
    //auth: "auth:operlog:export", //权限字段
  },
]
// 新增/删除表单配置
